package com.ecoolex.ying.space.core.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.ying.space.core.mapper.UserWorksMapper;
import com.ecoolex.ying.space.entity.UserWorks;

public interface UserWorksDAO extends UserWorksMapper {
	
	long countByWatch(@Param("userId") Integer userId,@Param("title") String title,@Param("worksType") Integer worksType,@Param("now") Date now);
	
	List<UserWorks> queryByWatch(@Param("userId") Integer userId,@Param("title") String title,@Param("worksType") Integer worksType,@Param("now") Date now,@Param("sorts") String sorts , @Param("page") Page page);
	
	long countByUserWorksShopping(@Param("userId") Integer userId,@Param("title") String title,@Param("worksType") Integer worksType);
	
	List<UserWorks> queryByUserWorksShopping(@Param("userId") Integer userId,@Param("title") String title,@Param("worksType") Integer worksType,@Param("sorts") String sorts , @Param("page") Page page);

	List<UserWorks> listByOutsourcinggoodsId(@Param("outsourcingGoodsId") Integer outsourcingGoodsId,@Param("size") Integer size);

	long countByOutsourcinggoodsId(@Param("outsourcingGoodsId") Integer outsourcingGoodsId);
	
	List<UserWorks> queryByOutsourcinggoodsId(@Param("outsourcingGoodsId") Integer outsourcingGoodsId,@Param("page") Page page);
}